<template>
  <div>
    <!-- 自建歌单歌曲显示 -->
       <nut-popup position="bottom" :style="{ height: '80%' }" v-model="show"  @close="closelist(tname)">
      <nut-cell :is-link="true"  v-for="item in this.singer" :key="item.id">
        <span slot="title">{{item.name}}</span>
      </nut-cell>
    </nut-popup>
  </div>
</template>
<script>
import { url, artistsublist } from "../../api/api";
export default {
  props: ["toshowsinger", "tname", "closelist"],
  data() {
    return {
      show: false,
      singer: [],
      num:"",
    };
  },
  mounted() {},
  methods: {
    //  获取收藏的歌手
    getsinger() {
      this.$axios.get(`${url}${artistsublist}`).then(
        data => {
            if(data.data.code == 200){
                this.num = data.data.count
                this.singer = data.data.data
            }
        },
        err => {
            this.$notify.danger(err.data.msg)
        }
      );
    }
  },
  watch: {
    toshowsinger() {
      this.show = this.toshowsinger;
      if (this.show == true) {
        this.getsinger();
      }
    }
  }
};
</script>
<style scoped>
</style>